package app.ui;
/*FIXME: irelevant code*/
import java.io.IOException;
import java.util.List;

import database.local.Business;
import database.local.QueryData;
import android.os.AsyncTask;
import android.util.Log;

public class GrabBusinessFromNet extends AsyncTask<Void, Void, Integer> {
	private List<Business> businessList;
	
	protected Integer doInBackground(Void... params) {
		try{
        //get the Business from the sever
        QueryData query = new QueryData();
		query.setCountry("Israel");
		query.setCity("Tel-Aviv");
		//query.setType("pub");
		
		businessList = query.getData();
		if (businessList != null)
				return 1;
		
		return 0;	
		}
		catch(IOException e1){
			Log.e("DEBUGTAG", "Remote business list exception", e1);
			}
		return 0;
	}
	
	public List<Business> getBusinessList(){
		return this.businessList;
	}

}
